package com.ymatou.iapi.godmch.service;

import com.shop2cn.iapi.shenqisettlement.parameter.resp.GetCurrencyConfigResp;
import com.ymatou.iapi.godmch.parameter.getCurrencyResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*获取商户币种Call
*FreeMaker Template自动生成代码
*/
public class getCurrencyCall extends YmatouBaseCall{
	private static String opurl ="api/mch/getCurrency";
	
	public getCurrencyCall() {
		super(EnvSetup.getSystemUrl("godmch_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	 public String getStatus1()
		{
		  return getString("status");
		}
		
		 public String getMessage()
		{
		 return getString("msg");
		}
	
	public getCurrencyResp getCurrencyResp() {
		getCurrencyResp o =null;
		try {
		String result = getJsonObject().get("result").getAsJsonObject()
				.toString();
		o = (getCurrencyResp) FormatUtil
				.GSONToObject(result, getCurrencyResp.class);
		}catch (Exception e) {
			e.printStackTrace();
		}
		return o;
	}
}